<?php

namespace app\index\controller\traits;

use think\Session;

trait Authorized
{

    /**
     * 角色授权判断
     */
    function isAuthorized()
    {

        if (!Session::has('CURRENT_USER')) {
            $output['success'] = false;
            $output['msg']     = '未授权操作请求,请先登录';

            _callback($output);
            exit;
        }
    }
}
